package com.guigu.eduservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备图片表（存储设备的展示图片，最多25张）
 * </p>
 *
 * @author Xiaosong
 * @since 2025-10-11
 */
@Data
@TableName("equipment_image")
public class EquipmentImage implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 图片唯一标识
     */
    @TableId(value = "image_id", type = IdType.AUTO)
    private Long imageId;

    /**
     * 关联设备表equipment_id（一个设备可对应多张图片）
     */
    private Long equipmentId;

    /**
     * 图片URL（设备展示图片的存储地址）
     */
    private String imageUrl;

    /**
     * 是否封面图（0-否，1-是；封面图在列表页展示）
     */
    private Integer isCover;

    /**
     * 排序号（控制图片在详情页的展示顺序）
     */
    private Integer sort;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public Long getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(Long equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getIsCover() {
        return isCover;
    }

    public void setIsCover(Integer isCover) {
        this.isCover = isCover;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "EquipmentImage{" +
            "imageId = " + imageId +
            ", equipmentId = " + equipmentId +
            ", imageUrl = " + imageUrl +
            ", isCover = " + isCover +
            ", sort = " + sort +
            ", createTime = " + createTime +
        "}";
    }
}
